<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="com.boxin.ims.modules.wechat.entity.Product" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1.0, user-scalable=0">
<title>确认支付</title>
<link href="${ctxStatic }/site/themes/default/css/boilerplate.css" rel="stylesheet" type="text/css">
<link href="${ctxStatic }/site/themes/default/css/css.css" rel="stylesheet" type="text/css">
<script src="${ctxStatic }/site/themes/default/js/respond.min.js"></script>

<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript"></script>
<script src="${ctxStatic}/site/themes/default/js/hideOptionMenu.js" type="text/javascript"></script>

<script type="text/javascript">

function pay(){
	WeixinJSBridge.invoke('getBrandWCPayRequest',
	${JSAPI}
	,function(res){
	if(res.err_msg == "get_brand_wcpay_request:ok" ) {
		WeixinJSBridge.log(res.err_msg);
		if(res.err_code==ok){
			alert("支付成功！订单不可重复提交，请返回");
		}
	}
//使用以上方式判断前端返回,微信团队郑重提示：res.err_msg将在用户支付成功后返回ok，但幵丌保证它绝对可靠。
	}); 
}

</script>

<style>
.dingdanh{margin-left:13%; border:1px dashed #ccc;width:240px;font-size:14px;padding:15px;}
</style>

</head>
<body>
<div class="gridContainer clearfix"  style="margin-bottom:50px;" >
  <div id="LayoutDiv1" style="min-height:0px;">
  	
  	<div class="order_dl2" style="margin-top:45%">
		 <p class="dingdanh">  
			<span class="font_left">订单编号：</span><span class="font_left ">${order.orderNo }</span><br/>   
		 	<span class="font_left">订单金额：</span><span class="font_left">￥${order.price/100 }</span><br/>
			<span class="font_left">下单时间：</span><span class="font_left"><fmt:formatDate value="${order.createTime}" type="both"/></span><br/>
		 </p>
	  	<input onclick="javascript:pay()" class="anniu Orange" type="submit" value="确认支付"  style="padding:3% 5% 3% 5%; margin-top:15px;color: #fff;font-size: 14px;margin-left: 35%;" />
  	</div>
  	
      <%-- 
    <dl class="order_dl2" style="margin-top:30%">
      <dt class="clear" >
       <p><span class="font_left">订单编号：</span><span class="font_left ">${order.orderNo }</span> </p>
        <p class="clear"><span class="font_left">订单金额：</span><span class="font_left">￥${order.price/100 }</span> </p>
       <p class="clear"><span class="font_left">下单时间：</span><span class="font_left"><fmt:formatDate value="${order.createTime}" type="both"/></span> </p>
      </dt>
      <dt class="clear" style="padding:10% 5%;">
       	<span class="anniu3 Orange" style="width:85%; height:20px;"  onclick="pay()">确认支付</span>
      </dt>
    </dl>
       --%>
  </div>
</div>



</body>
</html>
